import api from '@/api/api'

const configRoles = {
  name: '配置',
  role: '/config',
  children: [{
    name: '站点设置',
    role: '/siteConfig',
    api:
      [
        api.siteConfigGet,
        api.ftpList,
        api.ossList,
        api.tplList,
        api.siteCheckMaster,
        api.siteCheckDomain,
        api.siteCheckAccessPath
      ],
    children: [
      {
        name: '详情',
        role: '/siteConfig/get',
        api: [api.siteConfigGet, api.configGet]
      }, {
        name: '修改',
        role: '/siteConfig/edit',
        api: [api.siteConfigUpdate]
      }]
  }, {
    name: '统计设置',
    role: '/stat',
    api: [api.statList],
    children: [
      {
        name: '列表',
        role: '/stat/list',
        api: [api.statList]
      }, {
        name: '编辑',
        role: '/stat/edit',
        api: [api.statSave]
      }, {
        name: '添加',
        role: '/stat/add',
        api: [api.statSave]
      }, {
        name: '删除',
        role: '/stat/delete',
        api: [api.statDelete]
      }]
  }, {
    name: 'ftp管理',
    role: '/ftp',
    api: [api.ftpList],
    children: [
      {
        name: '列表',
        role: '/ftp/list',
        api: [api.ftpList]
      },
      {
        name: '详情',
        role: '/ftp/get',
        api: [api.ftpGet]
      }
      , {
        name: '编辑',
        role: '/ftp/edit',
        api: [api.ftpSave]
      }, {
        name: '添加',
        role: '/ftp/add',
        api: [api.ftpSave]
      }, {
        name: '删除',
        role: '/ftp/delete',
        api: [api.ftpDelete]
      }]
  }, {
    name: 'oss管理',
    role: '/oss',
    api: [api.ossList],
    children: [
      {
        name: '列表',
        role: '/oss/list',
        api: [api.ossList]
      }, {
        name: '详情',
        role: '/oss/get',
        api: [api.ossGet]
      }, {
        name: '编辑',
        role: '/oss/edit',
        api: [api.ossUpdate]
      }, {
        name: '添加',
        role: '/oss/add',
        api: [api.ossSave]
      }, {
        name: '删除',
        role: '/oss/delete',
        api: [api.ossDelete]
      }]
  }, {
    name: '内容类型',
    role: '/type',
    api: [api.typeList],
    children: [
      {
        name: '列表',
        role: '/type/list',
        api: [api.typeList]
      }, {
        name: '详情',
        role: '/type/get',
        api: [api.typeGet]
      }, {
        name: '编辑',
        role: '/type/edit',
        api: [api.typeUpdate]
      }, {
        name: '添加',
        role: '/type/add',
        api: [api.typeSave, api.typeCheckId]
      }, {
        name: '删除',
        role: '/type/delete',
        api: [api.typeDelete]
      }]
  }, {
    name: '模型管理',
    role: '/model',
    api: [api.modelList],
    children: [
      {
        name: '列表',
        role: '/model/list',
        api: [api.modelList]
      },
      {
        name: '详情',
        role: '/model/get',
        api: [api.modelGet]
      },
      {
        name: '编辑',
        role: '/model/edit',
        api: [api.modelUpdate, api.modelPriority]
      },
      {
        name: '添加',
        role: '/model/add',
        api: [api.modelSave, api.modelCheckId]
      },
      {
        name: '删除',
        role: '/model/delete',
        api: [api.modelDelete]
      },
      {
        name: '保存排序',
        role: '/model/priority',
        api: [api.modelPriority]
      },
      {
        name: '栏目模型',
        role: '/channelModel',
        api: [api.itemList],
        children: [
          {
            name: '列表',
            role: '/channelModel/list',
            api: [api.itemList]
          },
          {
            name: '详情',
            role: '/channelModel/get',
            api: [api.typeCheckId, api.itemGet]
          },
          {
            name: '保存默认选中字段',
            role: '/channelModel/save',
            api: [api.itemListSave]
          },
          {
            name: '添加',
            role: '/channelModel/add',
            api: [api.itemSave]
          },
          {
            name: '修改',
            role: '/channelModel/update',
            api: [api.itemUpdate]
          },
          {
            name: '删除',
            role: '/channelModel/delete',
            api: [api.itemDelete]
          },
          {
            name: '保存内容',
            role: '/channelModel/savePriority',
            api: [api.itemPriority]
          },
        ]
      },
      {
        name: '内容模型',
        role: '/contentModel',
        api: [api.itemList],
        children: [
          {
            name: '列表',
            role: '/contentModel/list',
            api: [api.itemList]
          },
          {
            name: '详情',
            role: '/contentModel/get',
            api: [api.typeCheckId, api.itemGet]
          },
          {
            name: '保存默认选中字段',
            role: '/contentModel/save',
            api: [api.itemListSave]
          },
          {
            name: '添加',
            role: '/contentModel/add',
            api: [api.itemSave]
          },
          {
            name: '修改',
            role: '/contentModel/update',
            api: [api.itemUpdate]
          },
          {
            name: '删除',
            role: '/contentModel/delete',
            api: [api.itemDelete]
          },
          {
            name: '保存内容',
            role: '/contentModel/savePriority',
            api: [api.itemPriority]
          },
        ]
      },
    ]
  }, {
    name: '全局设置',
    role: '/globel',
    children: [
      {
        name: '系统设置',
        role: '/globel/systemUpdate',
        api: [api.configGet, api.configSystemUpdate]
      }, {
        name: '登录设置',
        role: '/globel/loginUpdate',
        api: [api.configLoginGet, api.configLoginUpdate]
      }, {
        name: '用户设置',
        role: '/globel/memberUpdate',
        api: [api.configMemberGet, api.configMemberUpdate]
      }, {
        name: '用户注册模型',
        role: '/globel/registerModel',
        api: [api.configRegisterItemList],
        children: [
          {
            name: '列表',
            role: '/globel/registerModel/list',
            api: [api.configGet, api.configSystemUpdate]
          }, {
            name: '详情',
            role: '/globel/registerModel/get',
            api: [api.configRegisterItemGet]
          }, {
            name: '添加',
            role: '/globel/registerModel/add',
            api: [api.configRegisterItemSave]
          }, {
            name: '修改',
            role: '/globel/registerModel/edit',
            api: [api.configRegisterItemUpdate]
          }, {
            name: '删除',
            role: '/globel/registerModel/delete',
            api: [api.configRegisterItemDelete]
          }, {
            name: '保存排序',
            role: '/globel/registerModel/savePriority',
            api: [api.configRegisterItemPriority]
          }

        ]
      }, {
        name: '水印设置',
        role: '/globel/markUpdate',
        api: [api.configMarkGet, api.configMarkUpdate]
      }, {
        name: '网站防火墙配置',
        role: '/globel/firewallUpdate',
        api: [api.configFirewallGet, api.configFirewallUpdate]
      }, {
        name: '其他配置',
        role: '/globel/attrUpdate',
        api: [api.configAttrGet, api.configAttrUpdate, api.configAttrClear]
      }, {
        name: '机构信息设置',
        role: '/globel/companyUpdate',
        api: [api.configCompanyGet, api.configCompanyUpdate, api.dictionaryType]
      }, {
        name: '内容佣金配置',
        role: '/globel/contentUpdate',
        api: [api.configContentGet, api.configContentUpdate]
      }
    ]
  }, {
    name: '站点管理',
    role: '/site',
    api: [api.siteList, api.siteTree, api.siteCheckMaster, api.siteCheckAccessPath, api.siteCheckDomain],
    children: [
      {
        name: '列表',
        role: '/site/list',
        api:
          [
            api.siteList,
            api.listUrl,
            api.configGet,
            api.siteGet,
            api.ftpList,
            api.ossList,
            api.tplList
          ]
      },
      {
        name: '详情',
        role: '/site/get',
        api: [api.siteGet]
      },
      {
        name: '添加',
        role: '/site/add',
        api: [api.siteSave, api.siteGet]
      },
      {
        name: '修改',
        role: '/site/edit',
        api: [api.siteUpdate]
      },
      {
        name: '删除',
        role: '/site/delete',
        api: [api.siteDelete]
      }
    ]
  }, {
    name: '接口管理',
    role: '/apiManage',
    api: [],
    children: [
      {
        name: '接口设置',
        role: '/apiManage/apiUpdate',
        api: [api.apiGet, api.apiUpdate]
      }, {
        name: '单点登录认证',
        role: '/apiManage/apiSSOupdate',
        api: [api.apiSSOGet, api.apiSSOupdate]
      }, {
        name: '接口管理',
        role: '/apiManage/apiMan',
        api: [api.apiWebserviceList],
        children: [{
          name: '列表',
          role: '/apiManage/apiMan/list',
          api: [api.apiWebserviceList]
        }, {
          name: '详情',
          role: '/apiManage/apiMan/get',
          api: [api.apiWebserviceGet]
        }, {
          name: '添加',
          role: '/apiManage/apiMan/add',
          api: [api.apiWebserviceSave]
        }, {
          name: '修改',
          role: '/apiManage/apiMan/edit',
          api: [api.apiWebserviceUpdate]
        }, {
          name: '删除',
          role: '/apiManage/apiMan/delete',
          api: [api.apiWebserviceDelete]
        }]
      }, {
        name: '接口用户管理',
        role: '/apiManage/apiUserMan',
        api: [api.apiWebserviceAuthList],
        children: [{
          name: '列表',
          role: '/apiManage/apiUserMan/list',
          api: [api.apiWebserviceAuthList]
        }, {
          name: '详情',
          role: '/apiManage/apiUserMan/get',
          api: [api.apiWebserviceAuthGet]
        }, {
          name: '添加',
          role: '/apiManage/apiUserMan/add',
          api: [api.apiWebserviceAuthSave]
        }, {
          name: '修改',
          role: '/apiManage/apiUserMan/edit',
          api: [api.apiWebserviceAuthUpdate]
        }, {
          name: '删除',
          role: '/apiManage/apiUserMan/delete',
          api: [api.apiWebserviceAuthDelete]
        }]
      }, {
        name: '接口调用记录',
        role: '/apiManage/apiUseRecord',
        api: [api.apiWebserviceRecordList],
        children: [{
          name: '列表',
          role: '/apiManage/apiUseRecord/list',
          api: [api.apiWebserviceRecordList]
        }, {
          name: '删除',
          role: '/apiManage/apiUseRecord/delete',
          api: [api.apiWebserviceRecordDelete]
        }]
      }, {
        name: 'API接口记录',
        role: '/apiManage/apiRecord',
        api: [api.apiRecordList],
        children: [{
          name: '列表',
          role: '/apiManage/apiRecord/list',
          api: [api.apiRecordList]
        }, {
          name: '删除',
          role: '/apiManage/apiRecord/delete',
          api: [api.apiRecordDelete]
        }]
      },
      {
        name: 'API接口管理',
        role: '/apiManage/apiInfo',
        api: [api.apiInfoList],
        children:
          [
            {
              name: '列表',
              role: '/apiManage/apiInfo/list',
              api: [api.apiInfoList]
            }, {
            name: '详情',
            role: '/apiManage/apiInfo/get',
            api: [api.apiInfoGet]
          }, {
            name: '添加',
            role: '/apiManage/apiInfo/add',
            api: [api.apiInfoSave]
          }, {
            name: '修改',
            role: '/apiManage/apiInfo/edit',
            api: [api.apiInfoUpdate]
          }, {
            name: '删除',
            role: '/apiManage/apiInfo/delete',
            api: [api.apiInfoDelete]
          }
          ]
      },
      {
        name: 'API接口账户管理',
        role: '/apiManage/apiAccount',
        api: [api.apiInfoList],
        children:
          [
            {
              name: '列表',
              role: '/apiManage/apiAccount/list',
              api: [api.apiAccountList]
            },
            {
              name: '添加',
              role: '/apiManage/apiAccount/add',
              api: [api.apiAccountSave, api.apiAccountGet, api.apiAccountValPwd]
            }
          ]
      },

    ]
  }, {
    name: '短信服务',
    role: '/smsServer',
    api: [],
    children: [
      {
        name: '短信服务管理',
        role: '/smsServer/smsServer',
        api: [api.smsServerList],
        children: [
          {
            name: '列表',
            role: '/smsServer/smsServer/list',
            api: []
          }, {
            name: '添加',
            role: '/smsServer/smsServer/add',
            api: [api.smsServerSave, api.smsServerGET]
          }, {
            name: '修改',
            role: '/smsServer/smsServer/edit',
            api: [api.smsServerUpdate, api.smsServerGET]
          }, {
            name: '删除',
            role: '/smsServer/smsServer/delete',
            api: [api.smsServerDelete]
          }
        ]
      }, {
        name: '短信使用记录',
        role: '/smsServer/smsServer/smsRecord',
        api: [api.smsServersmsRecordList]
      }
    ]
  }
  ]
}
export default configRoles;
